package com.jic.member.mapper;

import com.jic.member.entity.MemberFavorite;
import com.jic.member.request.MemberFavoriteRequest;
import com.jic.member.request.MemberFavoriteRestRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 会员收藏信息表
 * @author : 
 * @email : 
 * @since : 2020-01-13 04:22:35
 * @version : v1.0.0
 */
@Mapper
public interface  MemberFavoriteMapper {

    long insert(MemberFavorite memberFavorite);

    long delete(@Param("memberFavorite") MemberFavorite memberFavorite);

    long update(MemberFavorite memberFavorite);

    MemberFavorite queryByPrimaryKey(Long id);

    List<MemberFavorite> query(MemberFavorite memberFavorite);

    List<MemberFavorite> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("memberFavoriteRequest") MemberFavoriteRequest memberFavorite);

    long queryPageCount(@Param("memberFavoriteRequest") MemberFavoriteRequest memberFavoriteRequest);

    Long queryFollowersByDeptId(@Param("entityId")Long businessId,@Param("entityType") Integer entityType);

    long countFollowersByEntityId(@Param("memberFavoriteRequest") MemberFavoriteRequest memberFavoriteRequest);

    Long batchInsert(@Param("memberFavorites") List<MemberFavorite> memberFavorites);

    Long batchUpdate(@Param("entityIds") List<Long> entityIds,@Param("memberId") Long memberId);

}
